Sentence creation apparatus and creation method

ABSTRACT

A sentence generating method and apparatus for generating a joke sentence set having a dual meaning. A predetermined word in a selected first idiom is stored in a W list. A word of analogous sound having the pronunciation same as or analogous with the word in the W list and also being of the same word class as the word in the W list is stored in a RW list. It is then checked whether or not the subject word stored in the P list has a semantic relationship with the word of the analogous sound in the RW list. If the result of check is affirmative, a first joke sentence having the subject word in the P list and composed of the subject word of the P list and the first idiom is generated. A second idiom, corresponding to the first idiom, in which the word in the W list is replaced by the word of the analogous sound in the RW list, is generated, and a second joke sentence composed of the subject word of the P list and the second idiom is generated.

TECHNICAL FIELD

This invention relates to an apparatus and a method for generating asentence, such as joke sentence, having a dual meaning, a recordingmedium for having a program used in the sentence generating apparatus,and to such program.

BACKGROUND ART

In these days, several instances of a joke sentence generating system,generating a joke sentence by exploiting a computer, have been reported.For example, instances of [JAPE] for automatically generating a riddle,an answer for which is a pun (BOKE for generating puns in Japanese), andthe [Class B Organization] for generating a pun sentence, in which aword in a sentence is replaced by another word having an analogouspronunciation, have been reported. The pun sentence is a sentence,analogous in nature, produced by combining plural words having the sameor analogous pronunciation, and is a joke sentence having humorouseffects.

The joke sentence herein means a sentence with elements of joke,laughing matter and humor.

The joke sentence generating system by the conventional computingprocessing suffers from a drawback that, in connection with a wordselected from a certain idiom, two sentences of respective differentmeanings, with the common subject, cannot be generated.

For example, the [BOKE (JAPE)] generates a riddle sentence:

[In various kinds of breads, what is the collapsed pan ?, uttered aspanwa pandemo pecchankonopanwa nanininaru ?]”and an answer sentence:

[It's puncture., uttered as panku]”. This is an instance in which theword

[bread, uttered as pan]”, of the basic sentence:

[In various kinds of breads, . . . , uttered as panwa pan . . . ]” isreplaced by

(PANKU)” indicating a state of an object, by combining the phonetic[PAN] of the

and the meaning of

[collapsed, uttered as pecchanko]” indicating another state of anobject.

That is, the

of the basic sentence is a name of a real object so that it is not ajoke sentence and only the generated

is the joke sentence. However, a sentence made up solely by the

does not make sense.

On the other hand,

(class B organization) generates a sentence exemplified by

[shooting up of nasal hemorrhage, uttered as uchiage hanji]”. This is aninstance in which the word

[fireworks, uttered as hanabi]” in the basic sentence

[shooting up of fireworks, uttered as uchiage hanabi]”, is replaced by

[nasal hemorrhage, uttered as hanaji]”, having the analogouspronunciation [HANAJI] with respect to the [HANABI] of the

.

That is, the

of the basic sentence is a name of a real object so that it is not ajoke sentence and only the generated

is the joke sentence. However, a sentence made up solely by the

does not make sense.

That is, as compared to the basic sentence, having the ordinary meaning,the generated joke sentence is simply analogous with the basic sentencein pronunciation and does not make sense. In this case, this failure inmaking sense gives a humorous effect. Stated differently, there is nosemantic relationship between the basic sentence and the joke sentencegenerated by the conventional computing processing. Specifically thecombination of the two sentences cannot be said to be a joke sentencehaving the dual meaning.

DISCLOSURE OF THE INVENTION

It is therefore an object of the present invention to provide a novelsentence generating apparatus and method free from the problems inherentin the above-described conventional joke sentence generating system.

It is another object of the present invention to provide a sentencegenerating apparatus and method in which joke sentences having dualmeanings may be generated by computing processing, a recording mediumfor having a program used for the sentence generating apparatus, and theprogram.

For accomplishing the above objects, the present invention provides asentence generating apparatus comprising recording means for having aplurality of idioms, a plurality of words, the meanings of the words,word classes of the words, and phonetics of the words, selecting meansfor reading out a preset idiom from the recording means and forselecting a preset word contained in the read-out idiom as a first word,first readout means for selecting, from the recording means, a wordhaving the pronunciation same as or analogous to the selected first wordand being of the same word class as the selected first word, based onthe phonetics and the word class of the-recorded first word, and readingout the selected word as a second word, second readout means forselecting the word, determined to have a semantic relationship with theread-out second word, from the recording means, based on the meaning ofthe of the recorded second word, and for reading out the selected wordas a third word, idiom generating means for generating an idiomcorresponding to the read-out idiom except that the selected first wordamong the words making up the read-out idiom is replaced by the read-outsecond word, and sentence generating means for generating a firstsentence, composed of the third word and the read-out idiom, with theread-out third word as a subject of the sentence, and for generating asecond sentence, composed of the third word and the generated idiom,with the read-out third word as a subject of the sentence.

Preferably, the recording means further has a plurality of adjectivespertinent to the recorded idioms, there being provided third read-outmeans for reading out the adjectives pertinent to the selected idiomsfrom the recording means, the sentence generating means generating thefirst sentence made up by the third word, read-out idiom and theread-out adjective and also generating the second sentence made up bythe third word, generated idiom and the read-out adjective.

The present invention also provided a method for generating a jokesentence by a sentence generating apparatus including recording meansfor having a plurality of idioms, a plurality of words, the meanings ofthe words, word classes of the words, and phonetics of the words, inwhich the method comprises a selecting step of reading out a presetidiom from the recording means and selecting a preset word contained inthe read-out idiom as a first word, a first readout step of selecting,from the recording means, a word having the pronunciation same as oranalogous to the selected first word and being of the same word class asthe selected first word, based on the phonetics and the word class ofthe recorded first word, and reading out the selected word as a secondword, a second readout step of selecting a word, determined to have asemantic relationship with the read-out second word, from the recordingmeans, based on the meaning of the of the recorded second word, andreading out the selected word as a third word, an idiom generating stepof generating an idiom corresponding to the read-out idiom except thatthe selected first word among the words making up the read-out idiom isreplaced by the read-out second word, and a sentence generating step ofgenerating a first sentence, composed of the third word and the read-outidiom, with the read-out third word as a subject of the sentence, andfor generating a second sentence, composed of the third word and thegenerated idiom, with the read-out third word as a subject of thesentence.

The present invention also provides a sentence generating apparatus forgenerating a sentence comprising selecting means for selecting a firstword from a preset medium, detection means for selecting a second wordhaving the pronunciation same as or analogous to the first word selectedby the selecting means and being of the same word class as the firstword, subject selecting means for selecting a third word as a subjecthaving a semantic relationship with the first word and/or with thesecond word and sentence generating means for generating a firstsentence employing the first word, and a second sentence employing thesecond word in substitution for the first word, using the third word asa subject of the sentences.

The present invention also provides a recording medium for having acomputer-readable program for a sentence generating apparatus includingrecording means for having a plurality of idioms, a plurality of words,the meanings of the words, word classes of the words, and phonetics ofthe words. The program comprises a selecting step of selecting apredetermined word, contained in a preset idiom read out from therecording means, as a first word, a first readout step of selecting,from the recording means, a word having the pronunciation same as oranalogous to the selected first word and being of the same word class asthe selected first word, based on the phonetics and the word class ofthe recorded first word, and reading out the selected word as a secondword, a second readout step of selecting the word, determined to have asemantic relationship with the read-out second word, from the recordingmeans, based on the meaning of the recorded second word, and reading outthe selected word as a third word, an idiom generating step ofgenerating an idiom corresponding to the read-out idiom except that theselected first word among the words making up the read-out idiom isreplaced by the read-out second word, and a sentence generating step ofgenerating a first sentence, composed of the third word and the read-outidiom, with the read-out third word as a subject of the sentence, andfor generating a second sentence, composed of the third word and thegenerated idiom, with the read-out third word as a subject of thesentence.

The present invention also provides a program for having a computerexecute a program, which computer controls a sentence generatingapparatus including recording means for having a plurality of idioms, aplurality of words, the meanings of the words, word classes of thewords, and phonetics of the words. The program comprises a selectingstep of selecting a preset word contained in an idiom, read out from therecording means, as a first word, a first readout step of selecting,from the recording means, a word having the pronunciation same as oranalogous to the selected first word and being of the same word class asthe selected first word, based on the phonetics and the word class ofthe recorded first word, and reading out the selected word as a secondword, a second readout step of selecting a word, determined to have asemantic relationship with the read-out second word, from the recordingmeans, based on the meaning of the recorded second word, and reading outthe selected word as a third word, an idiom generating step ofgenerating an idiom corresponding to the read-out idiom except that theselected first word among the words making up the read-out idiom isreplaced by the read-out second word, and a sentence generating step ofgenerating a first sentence, composed of the third word and the read-outidiom, with the read-out third word as a subject of the sentence, andfor generating a second sentence, composed of the third word and thegenerated idiom, with the read-out third word as a subject of thesentence.

In the apparatus and method for generating a sentence, according to thepresent invention, a preset first word among words making up a presetfirst idiom is replaced by a second word same as or analogous with thefirst word in pronunciation to generate a second idiom. A first sentencemade up by a third word determined to have a semantic relationship withthe second word and the first idiom is generated, with the third word asa subject of the sentence. A second sentence made up by the third wordand the second idiom is generated, with the third word as a subject ofthe sentence.

Other objects, features and advantages of the present invention willbecome more apparent from reading the embodiments of the presentinvention as shown in the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an illustrative structure of asentence generating apparatus embodying the present invention.

FIG. 2 is a flowchart for illustrating the processing by a sentencegenerating apparatus embodying the present invention.

FIG. 3 is a flowchart, continuing to FIG. 2, for illustrating theprocessing by the sentence generating apparatus embodying the presentinvention.

FIG. 4 illustrates an exemplary idiom database recorded in the sentencegenerating apparatus embodying the present invention.

FIG. 5 illustrates an exemplary word database recorded in the sentencegenerating apparatus embodying the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION

By referring to the drawings, a method and an apparatus for generating asentence, such as a joke sentence, are explained in detail.

Referring to FIG. 1, a sentence generating apparatus, embodying thepresent invention, includes a CPU (central processing unit) forexecuting various processing operations in accordance with a programstored in a ROM (read-only memory) 12 or a program read out from astorage device 18 to a RAM (random access memory) 13. The RAM 13 alsostores e.g., data necessary for the CPU 11 to execute various processingoperations.

The CPU 11, ROM 12 and the RAM 13 are interconnected over a bus 14. Toan input/output interface 15, also connected to this bus 14, areconnected an input unit 16, made up by e.g., a keyboard and a mouse, adisplay, made up by e.g., a CRT or LCD, an output unit 17, such as aloudspeaker, and a storage unit 18, such as a hard disc.

To the input/output interface 15 is connected a drive 19 as necessary. Amagnetic disc 31, an optical disc 32, a magneto-optical disc 33 and asemiconductor memory 34 are loaded as shown. A computer program read outtherefrom is installed on the storage unit 18 as necessary.

Referring to the flowchart of FIGS. 2 and 3, the operation of thesentence generating apparatus, shown in FIG. 1, is now explained. FIGS.2 and 3 show the processing by a sentence generating apparatus 1.

In the present invention, the joke sentence means a sentence includingelements of joke, laughing matter, and humor.

In the present embodiment of the sentence generating apparatus 1, anidiom database 71, shown in FIG. 4, and a word database 81, shown inFIG. 5, are pre-stored in the storage unit 18, such that optional datastored in these databases are read out from time to time to the RAM 13,under control by the CPU 11.

Moreover, in the present embodiment of the sentence generating apparatus1, a [list] is generated on the RAM 13 by the CPU 11. The [list] means aset of [areas] in each of which a word data is recorded. That is, theCPU 11 records an optional word data in an optional [area] in the[list]. The number of [areas] owned by the [list] is determined from one[list] to another. When a new word data is stored in the [list] in thetotality of [areas] of which word data have already been recorded, theCPU 11 erases the word data stored in the preset [area] and overwritesthe new word data on this [area] for storage therein. The word datastored in the optional [area] of the [list] are read out from time totime to the RAM 13 by the CPU 11.

In the following, this [readout] is termed [fetch]. In this case, the[area] in which the word data fetched has so far been stored becomesvoid, such that a new word data may be stored in this void [area]. Each[list] will be explained in detail subsequently.

In generating the joke sentence, the user selects an idiom which is tobe the basis of the joke sentence.

An idiom means a phrase made up of plural words including verb and whichhas an intrinsic meaning. In the present embodiment, each idiom isafforded with an intrinsic ID and is stored in the idiom database 71.That is, the idiom database 71 has an item [id] and an item [idiom], andthe ID is stored in the item [id], while the idiom is stored in the item[idiom].

Meanwhile, the present embodiment of the idiom database 71 also has anitem [adjective]. This will be explained subsequently.

Thus, a user desirous to select an idiom only has to select an IDcorresponding to the desired idiom.

Suppose that a user generates a joke sentence using an idiom [take abow] .

As indicated in the idiom database 71, the ID corresponding to [take abow] is [2]. Thus, the user acts on an input unit 16 of the sentencegenerating apparatus 1 to input [ID=2].

In a step S41, the CPU 11 reads out data of the idiom associated withthe input ID from the item [idiom] of the idiom database 71.

In the present embodiment, since the input [ID] is [2], data [take abow], associated with [2] of the item [id] of the idiom database 71, isread out.

In a step S42, the CPU 11 generates a [WLIST list] to store the totalityof the word data contained in the data of the idiom read out in theprocessing of step S41. Meanwhile, there is no limitation to the numberof word data that may be stored in the [WLIST list]. That is, a numberof the [areas] equal to the number of words included in the read-outidioms are generated and a set of these [areas] becomes the [WLISTlist].

In the present embodiment, two word data of [take] and [bow] are storedin the [WLIST list].

In a step S43, the CPU 11 verifies whether or not there is word data inthe [WLIST list]. If it is determined that there is no word data, thatis that the [WLIST list] is void, the processing of the sentencegenerating apparatus 1 is terminated.

In the step S43, the CPU 11 verifies whether or not there is word datain the [WLIST list] and, if it is determined that there is word data, anoptional word data is fetched in a step S44 from the [WLIST list]. TheCPU 11 also generates a [W list] to store the fetched word data in the[W list] . Meanwhile, there is one [area] owned by the [W list]. Thatis, the number of the word data that can be stored in the [w list] isone.

In a step S45, the CPU 11 determines word data having the pronunciationwhich is the same as or analogous to that of the word data stored in the[W list], by retrieval from the item [word] of the word database 81,based on the item [phonetic (phonetic symbol)] of the word database 81.The word data having the pronunciation which is the same as or analogousto that of the word data stored in the [W list] is termed below an worddata of analogous sound.

If, in a step S45, an word data of analogous sound is determined to benot present in the word database 81, the CPU 11 proceeds to a step S43,where the CPU 11 stores another word data stored in the [W list], in the[W list], to retrieve the word data of analogous sound for this worddata.

If, in a step S45, a word data of analogous sound is determined to bepresent in the word database 81, the CPU 11 proceeds to a step S46 wherethe CPU 11 reads out one word data of analogous sound from the item[word] of the word database 81.

In a step S47, the CPU 11 checks, based on the item [pos (word class)]in the word database 81, whether or not a word class of the word datastored in the [w list] is the same as a word class of the word data ofanalogous sound read out in the processing of a step S46.

If, in the step S47, it has been found that [the word classes are notthe same], the CPU 11 reverts to the step S45 where the CPU 11 retrievesnew word data of analogous sound.

If, in the step S47, it has been found that [the word classes are thesame], the CPU 11 generates in a step S48 a [HLIST list] to store theword data of analogous sound read out in the processing of the step S46in the [HLIST list]. Meanwhile, there is to be no limitation to thenumber of word data stored in the [HLIST list].

In a step S49, the CPU 11 checks whether or not there is further worddata of analogous sound in the item [word] of the word database 81. Ifit is determined that there is such further data, the CPU reverts to thestep S46 where the CPU 11 stores the totality of the word data ofanalogous sound having the same word class as that of the word datastored in the [W list] in the [HLIST list].

If the word data of analogous sound cease to exist in the item of the[word] of the word database 81, that is if the result of check in thestep S49 is NO, the CPU proceeds to a step S50.

It is assumed that, in the present embodiment, [take] has been fetchedfrom the [WLIST list] and that [take] has been stored in the [W list].It is also assumed that no word having the phonetic analogous to thephonetic [teik] of [take] has been recorded in the word database 81. Insuch case, the word data of analogous sound of [take] is determined tobe not present, such that the processing pertinent to [take] isterminated and a word data is fetched from the [WLISI list]. In thepresent instance, [bow] left in the [WLISI list] is fetched. The data ofa word [bough], having a phonetic symbol coincident with the phonetic[bau] of [bow] is read out as word data of analogous sound from the worddatabase 81. In the present embodiment, the CPU 11 retrieves word datahaving the phonetic which is completely the same as the [bow] as theword data of analogous sound. However, it is also possible to calculatethe degree of analogy or closeness of the pronunciation to the [bow] toretrieve word data having the calculated value of the degree of analogywithin a preset range as the word data of analogous sound.

The word classes of the [bow] and the [bough] are then checked. It isdetermined that the [word classes are the same] because the word classesof the [bow] and the [bough] are both a [noun]. As a result, the [bough]and [bow] are stored in the [HLISI list] as being the word data ofanalogous sound of the same word class as the [bow]. Meanwhile, since noother word data of analogous sound has been recorded in the worddatabase 81, only the [bough] is stored in the [HLISI list].

In a step S50 of FIG. 3, the CPU 11 checks whether or not there is anyword data of analogous sound in the [HLISI list] and, if it isdetermined that there is no word data of analogous sound, the CPUreverts to the step S43 to store the word data of analogous sound foranother word data in the [WLISI list] in the [HLISI list] .

In the step S50, the CPU 11 verifies whether or not there is any worddata of analogous sound in the [HLIST list] and, if it is determinedthat such word data of analogous sound exists, one word data ofanalogous sound is fetched in a step S51 from the [HLISI list].

In a step S52, the CPU 11 generates a [RW list] to store the word dataof analogous sound, fetched by the processing of step S51, in the [RWlist] .

Meanwhile, the number of words that can be stored in the [RW list] isone.

In a step S53, the CPU 11 retrieves words, that may become the subjectof the so generated joke sentence, from the item of the [word] in theword database 81, to check whether or not there is any word data in theword database 81 which may become a candidate for a subject.

If it is determined in the step S53 that there is no word data, the CPUrevelts to the step S50, where the CPU 11 fetches new word data ofanalogous sound from the [HLISI list].

If it is determined in the step S53 that there is word data, the CPU 11in a step S54 reads out word data, which may become a candidate for asubject, from the item of the [word] in the word database 81. The CPU 11generates a [P list] to store the word data as read out in the [P list].Meanwhile, the number of word data stored in the [P list] is one. Theword data stored in the [P list] is termed the subject word data.

In a step S55, the CPU 11 checks, based on the item [relating words(word meaning)] in the word database 81, whether or not there is anysemantic relationship between the subject word data stored in the [Plist] and the word data of analogous sound stored in the [RW list]. Forexample, the CPU 11 compares the item [relating words (word meaning)] inthe word database 81 associated with the subject word data stored in the[P list] and the item [relating words (word meaning)] in the worddatabase 81 associated with the analogous word data stored in the [RWlist]. If there is any word data common to the two items, the CPUdetermines that there is [semantic relationship].

If it is determined in the step S55 that there is no [semanticrelationship] between the subject word data and the analogous word data,the CPU 11 reverts to the step S53 where the CPU retrieves other worddata, as a candidate for a subject, from the item of the [word] in theword database 81.

If it is determined in the step S55 that there is the semanticrelationship between the subject word data and the analogous word data,the CPU proceeds to a step S56.

In the present embodiment, only the [bough] is stored in the [HLISIlist], as discussed above. Thus, the [bough] is fetched and stored inthe [RW list] as the analogous word data. It is now assumed that [chef]is read out from the word database 81 as the candidate for a subject andstored in the [P list]. That is, the [chef] becomes the subject worddata.

It is then verified whether or not there is any semantic relationshipbetween the analogous word data [bough] and the subject word data[chef]. That is, it is verified whether or not there is any common worddata in the item [relating words (word meaning) ] in the word database81. There is no common word data between the item [relating words (wordmeaning)] of the [bough] and the item [relating words (word meaning)] ofthe [chef], as indicated in the word database 81. That is, it is nowdetermined that there is no semantic relationship between the [bough]and the [chef].

Another candidate for a subject is selected and it is similarly checkedwhether or not there is any semantic relationship with the [bough]. Itis assumed that [lumberjack] is selected as the candidate for a subjectso as to be stored in the [P list]. That is, the [lumberjack] becomesthe subject word data. In this case, there is a common word data [wood]in the item [relating words (word meaning)] of the [bough] and the item[relating words (word meaning)] of the [lumberjack], as indicated in theword database 81. As a result, the semantic relationship is determinedto exist between the [bough] and the [lumberjack]. A joke sentence isgenerated by the following processing, with the [lumberjack] stored inthe [P list] as the subject word data and with the [bough] stored in the[RW list] as the analogous word data.

That is, the CPU 11 in a step S56 reads out an arbitrary one word datafrom the item of the [adjective] of the idiom database 71 associatedwith the ID input by the processing in the step S41. The CPU 11generates an [ADJ list] to store the read-out word in the [ADJ list].The word data stored in the [ADJ list] is now termed adjective worddata. The number of the word data that can be stored in the [ADJ list]is one.

In the item of the [adjective], the word data of the adjective usable asan idiom associated with the same ID is recorded. That is, by using theword data of this adjective as the joke sentence, there is derived aneffect of emphasizing the meaning of the joke of the joke sentence to begenerated.

Since the ID of the present instance is [2], the candidate of theadjective is [performing] or [entertaining], as indicated in the item[adjective] in the idiom database 71. It is assumed that the[performing] is selected and stored as an adjective word data in the[ADJ list].

In the next step S57, the CPU 11 generates data of the first jokesentence and data of the second joke sentence, using adjective word datastored in the [ADJ list], analogous word data stored in the [RW list],subject word data stored in the [P list] and data of the idiomassociated with the selected ID. It is noted that, as will be explainedsubsequently, a joke sentence having a dual meaning is generated fromthese first and second joke sentences as a set.

For example, the following processing is carried out to generate data ofthe first joke sentence and data of the second joke sentence.

That is, the CPU 11 generates an [IDIOM list] and an [IDIOM′ list].

The CPU 11 reads out data of the idiom, associated with the ID selectedin the processing of step S41, from the item [idiom] of the idiomdatabase 71, to store the data of the idiom in the [IDIOM list].

The CPU 11 substitutes the word data of analogous sound, stored in the[RW list], for the word data which is the same as the word data storedin the [W list], in the word data making up the so read-out idiom, togenerate data of a new idiom, to store the data of the so generatedidiom in the [IDIOM′ list].

The CPU 11 generates a [list of first joke sentences] and fetches worddata from the lists in the order of [ADJ list]→[P list]→[IDIOM list] andarrays the word data in the order the data were fetched to generate dataof one sentence to store the data of the generated sentence in the [listof first joke sentences]. Specifically, the [list of first jokesentences] is made up by the [ADJ list]+[P list]+[IDIOM list] . The dataof the sentences stored in the [list of first joke sentences] is termedbelow the first joke sentence data.

In similar manner, the CPU 11 generates a [list of second jokesentences] and fetches word data from the lists in the order of [ADJlist]→[P list]→[IDIOM′ list] and arrays the word data in the order thedata were fetched to generate data of one sentence to store the data ofthe generated sentence in the [list of second joke sentences].Specifically, the [list of second joke sentences] is made up by the [ADJlist]+[P list]+[IDIOM′ list]. The data of the sentences stored in the[list of second joke sentences] is termed below the second joke sentencedata.

In the present embodiment, the data of sentences stored in the [list offirst joke sentences] and in the [list of second joke sentences] (set ofword data) are as follows:

-   data of the first joke sentence: performing lumberjack take a bow-   data of the second joke sentence: performing lumberjack take a bough

Meanwhile, there is to be no limitation to the number of word data thatmay be stored in the [list of second joke sentences].

At the next step S58, the CPU 11 trims the basic style of a sentence.For example, the CPU 11 in the processing of step S57 fetches the dataof the first joke sentence, stored in the [list of first joke sentences]in the processing in the step S57, and the data of the second jokesentence, stored in the [list of second joke sentences] in theprocessing in the step S57, and applied the following [rule of basicstyle] to the so fetched first and second joke sentences to process thedata. The CPU 11 stores the so processed data of the first joke sentencein the [list of first joke sentences], while storing the so processeddata of the second joke sentence in the [list of second joke sentences].

Rules of basic style:

-   (1) A sentence begins with a capital letter;-   (2) An additive noun is preceded by “a”; and-   (3) For the third person singular present tense, a verb ends with s.

In the present embodiment, the data of the first and second jokesentences are processed as follows:

-   data of the first joke sentence: A performing lumberjack takes a    bow.-   data of the second joke sentence: A performing lumberjack takes a    bough.

In a step S59, the CPU 21 records the [list of first joke sentences] andthe [list of second joke sentences] in the storage unit 18.

After the processing in the step S59, the CPU reverts to the step S43 ofFIG. 2 to generate another joke sentence based on the idiom associatedwith the selected ID. This operation is continued until word data ceasesto exist in the [WLISI list], as described above.

The sentence generating apparatus 1 is able to generate a joke sentencehaving a dual meaning, as discussed previously. Stated differently, thesentence generating apparatus 1 generates the first and second jokesentences having the semantic relationship to each other.

In the present embodiment, the selected idiom as the basis in generatingthe joke sentences is [take a bow]. This idiom has a meaning: [a playeron a stage etc. makes a final bow].

The sentence generating apparatus 1 now selects a [bough (branch of atree)] in place of the [bow] and concomitantly the [lumberjack] isselected as the subject to generate the first and second joke sentenceshaving the following meanings:

-   First joke sentence: A performing lumberjack takes a bow.-   Meaning of the first joke sentence: An entertaining woodcutter makes    a bow on a stage.-   Second joke sentence: A performing lumberjack takes a bough.-   Meaning of the second joke sentence: An entertaining woodcutter cuts    a branch of a tree.

That is, when the first joke sentence is read aloud, not only themeaning of the first joke sentence but also the meaning of the secondjoke sentence may be imparted to the listener, because [takes a bow] ispronounced similarly to [takes a bough]. That is, the dual meaning maybe imparted to the listener, who then feels the sense of humor in thedual meaning.

Moreover, the first joke sentence by itself may impart the sense ofhumor. That is, if [an actor] is selected as a subject, a first jokesentence:

A performing actor takes a bow.

is generated. The first sentence, thus generated, is a common sentence,from which no sense of humor is imparted.

On the other hand, the subject selected by the sentence generatingapparatus 1 is a [lumberjack] (woodcutter), and the generated firstsentence conveys the meaning: [an entertaining woodcutter makes a bow ona stage] . By selecting the [woodcutter] as the subject, the first jokesentence may become a humorous sentence.

Additionally, the adjective [performing] has an effect of producingmental association with the basic idiom: [take a bow], thus furtherintensifying the sense of the joke.

It should be noted that there is no limitation to the method forselecting an adjective for emphasizing the joke. For example, the CPU 11is able to select the adjective by exploiting the numerical valuesindicative of the ease in envisioning an image, as obtained from theinformation of the cognitive psychology.

The sentence generating apparatus 1 mounts the idiom database 71 and theword database 81, as discussed previously. However, there is nolimitation to the database(s) mounted.

The above-described sequence of operations may be executed by a hardwareor by a software. If the sequence of operations is executed by thesoftware, the program forming the software is installed on a computerloaded on a dedicated hardware, or installed from e.g., a network or arecording medium to for example, a general-purpose personal computerdesigned to perform various functions based on a program installedthereon.

This recording medium may be formed by a package medium, such as amagnetic disc 31 (inclusive of a floppy disc), an optical disc 32(CD-ROM (compact disc read-only memory)), a DVD (digital versatiledisc), a magneto-optical disc 33 (inclusive of a mini-disc (MD)) or asemiconductor memory 34, having the program and which is distributed forproviding the program to the user, by a ROM 12 having the program andwhich is provided to the user in the state pre-assembled in the mainbody unit of the apparatus, or by a hard disc mounted in the storageunit 18, as shown in FIG. 1.

According to the present invention, the steps stating the programrecorded on the recording medium includes not only the processingcarried out chronologically in accordance with the stated sequence butalso the processing which is not necessarily processed chronologicallybut which is executed in parallel or batch-wise.

The present invention is applied not only to the sentence generatingapparatus 1 for generating joke sentences, defined as described above,but may be applied to a sentence generating apparatus for generating thetwo sentences having the common subject and conveying the differentmeaning for a word selected from a given idiom.

That is, according to the present invention, the semantic relationshipwith one or both of first and second words may be checked in selectingthe subject.

INDUSTRIAL APPLICABILITY

According to the present invention, a second idiom, in which a presetfirst word of words making up a preset first idiom is replaced by asecond word having a pronunciation which is the same as or analogous tothe first word and which is of the same word class as the first word, isgenerated. Using a third word, verified to have the semanticrelationship to the second word, as a subject, the first sentence,formed by the third word and the first idiom, is generated, while thesecond sentence, formed by the third word and the second idiom, isgenerated, so that there may be generated a joke sentence set having adual meaning.

1. A sentence generating apparatus comprising: recording means forstoring a plurality of idioms comprising a verb and having an intrinsicmeaning, a plurality of words, a list of related words of said words,word classes of said words, and phonetics of said words; first wordselecting means for reading out a first idiom from said recording meansand for selecting a word contained in the first idiom as a first word;second word selecting means for reading out a word stored in saidrecording means and having a pronunciation that is the same as oranalogous to said first word and being of the same word class as saidfirst word, based on the phonetics and the word class of the recordedfirst word, and for selecting the read-out word as a second word; thirdword selecting means for reading out a next word stored in saidrecording means and having a semantic relationship with the second word,and selecting the next word as a third word, wherein the third wordselecting means determines a semantic relationship of the next word withthe second word based on a common word in the list of related words ofthe next word and the list of relating words of the second word storedin the recording means, and wherein, when no semantic relationship isfound between the next word and the second word, the third wordselecting means selects a second next word; idiom generating means forgenerating a second idiom by replacing the first word contained in thefirst idiom with the second word; and sentence generating means forgenerating a first sentence comprising the third word as a subject ofthe first sentence and the first idiom and for generating a secondsentence comprising the third word as a subject of the second sentenceand the second idiom.
 2. The sentence generating apparatus according toclaim 1 wherein the sentence generated by said sentence generating meansis a joke sentence.
 3. The sentence generating apparatus according toclaim 1 wherein said recording means further has a plurality ofadjectives pertinent to the recorded respective idioms; there beingprovided fourth word selecting means for reading out the adjectivespertinent to the selected idioms from said recording means and forselecting the adjectives as a fourth word; said sentence generatingmeans generating said first sentence made up by said third word, thefirst idiom and the fourth word and also generating said second sentencemade up by said third word, the second idiom and the fourth word.
 4. Amethod for generating a joke sentence by a sentence generating apparatusthat comprises recording means for having a plurality of idiomscomprising a verb and having an intrinsic meaning, a plurality of words,a list of related words of said words, word classes of said words, andphonetics of said words, said method comprising: a first word selectingstep of reading out a first idiom from said recording means and forselecting a word contained in the first idiom as a first word; a secondword selecting step of reading out a word stored in the storing meansand having the pronunciation same as or analogous to said selected firstword and being of the same word class as said first word and selectingthe read-out word as a second word; a third word selecting step ofarbitrarily reading out a next word, stored in said recording means andhaving a semantic relationship with the second word, and selecting thenext word as a third word, wherein the third word selecting stepdetermines a semantic relationship of the third word with the secondword based on a common word in the list of related words of the thirdword and the list of related words of the second word stored in therecording means, and wherein, when no semantic relationship is foundbetween the next word and the second word, the third word selecting stepselects a second next word; and an idiom generating step of generating asecond idiom by replacing the first word contained in the first idiomwith the second word; and a sentence generating step of generating afirst sentence comprising the third word as a subject of the firstsentence and the first idiom and generating a second sentence comprisingthe third word as a subject of the second sentence and the second idiom.5. The sentence generating method according to claim 4 wherein thesentence generated by said sentence generating step is a joke sentence.6. A sentence generating apparatus for generating a sentence comprising:first word selecting means for selecting a first word from a presetmedium; second word selecting means for selecting a second word havingthe pronunciation same as or analogous to the first word selected bysaid selecting means and being of the same word class as said firstword; third word selecting means for selecting a next word as a subjectby arbitrarily selecting a next word, determining whether the next wordhas a semantic relationship with the second word and reading out thenext word as a third word, wherein the third word selecting meansdetermines a semantic relationship of the next word with the second wordbased on a common word in a word description stored in the recordingmeans, and wherein, when no semantic relationship is found between thenext word and the second word, the third word selecting means selects asecond next word; and sentence generating means for generating a firstsentence comprising said first word and the third word as a subject ofthe first sentence, and for generating a second sentence comprising saidsecond word in substitution for said first word and said third word as asubject of the second sentence.
 7. The sentence generating apparatusaccording to claim 6 wherein said sentence is a joke sentence.
 8. Arecording medium for having a computer-readable program for a sentencegenerating apparatus that comprises recording means for having aplurality of idioms comprising a verb and having an intrinsic meaning, aplurality of words, a list of related words of said words, word classesof said words, and phonetics of said words, said program comprising: afirst word selecting step of reading out a first idiom from saidrecording means and for selecting a word contained in the first idiom asa first word; a second word selecting step of reading out a word storedin the storing means and having the pronunciation same as or analogousto said selected first word and being of the same word class as saidfirst word and selecting the read-out word as a second word; a thirdword selecting step of arbitrarily reading out a next word stored insaid recording means and having a semantic relationship with the secondword and selecting the next word as a third word, wherein the third wordselecting step determines a semantic relationship of the third word withthe second word based on a common word in the list of relating words ofthe third word and the list of relating words of the second word storedin the recording means, wherein, when no semantic relationship is foundbetween the next word and the second word, the third word selecting stepselects a second next word; and an idiom generating step of generating asecond idiom by replacing the first word contained in the first idiomwith the second word; and a sentence generating step of generating afirst sentence comprising the third word as a subject of the firstsentence and the first idiom and generating a second sentence comprisingthe third word as a subject of the second sentence and the second idiom.